<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<link rel="stylesheet" type="text/css" href="<%=basePath%>/app/plugins/dialog/css/dialog.css" />
<script type="text/javascript" src="<%=basePath%>/app/plugins/dialog/js/dialog.js"></script>
<script>
    $(function () {
        $.ajax({
            url: _basePath + "app/member/loginWechat",
            dataType: 'json',
            success: function (data) {
                if(typeof data != undefined && data.resCode == 0){
                    redirectToOriPage();
                }else if(data.resCode == 3){
                    /*mui.openWindow({
                        url: _basePath + "app/page?pv=mine_mobile&id=" + data.resultList + "&url="+ '${url}'
                    })*/
                    window.location.replace(_basePath + "app/page?pv=mine_mobile&id=" + data.resultList + "&url="+ '${url}');
                }else{
                    mui.toast(data['message']);
                }
            }
        });
    });
    
    function redirectToOriPage() {
        mui.openWindow({
            url : _basePath + '${url}'
        })
    }
</script>